package com.fastloan.mgt.invest.model.count;

import java.util.List;

/**
 * Created by gelon on 2017/10/16.
 */
public class ChoiceQuestion extends BaseQuestion{

    List<AnswerCount> answerCounts ;



    public List<AnswerCount> getAnswerCounts() {
        return answerCounts;
    }

    public ChoiceQuestion setAnswerCounts(List<AnswerCount> answerCounts) {
        this.answerCounts = answerCounts;
        return this;
    }

    public ChoiceQuestion(List<AnswerCount> answerCounts,String detail , String typeName) {
        this.answerCounts = answerCounts;
        this.detail = detail ;
        this.typeName = typeName ;
    }


    public void generatorAnsPercentage(){
        answerCounts.forEach(answerCount -> answerCount.generPercentage(num));
    }




}
